home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 001-100 / 001-025 / 004 / mandel / mand4.c < prev    next >
C/C++ Source or Header  |  1995-03-17  |  9KB  |  208 lines

  1. /*
  2.                      MAND4.C - Information
  3.              Mandelbrot Self-Squared Dragon Generator
  4.                     For the Commodore Amiga
  5.                          Version 2.00
  6.  
  7.                       Accompanies MAND.C
  8.  
  9.              Copyright (C) 1985, Robert S. French
  10.                   Placed in the Public Domain
  11.  
  12.      Assorted Goodies and Intuition-stuff by =RJ Mical=  1985
  13.  
  14. This program may be distributed free of charge as long as the above
  15. notice is retained.
  16.  
  17. */
  18.  
  19. /* === IMPORTANT NOTE: =================================================
  20.  *   If you are going to design Information pages, make sure that all
  21.  *   lines are a maximum of 59 characters long.  Also, make sure that
  22.  *   there are 19 lines at most per page.  These two restrictions
  23.  *   combined comprise the reason why the info pages are (and should
  24.  *   remain) terse.
  25.  * =====================================================================
  26.  */
  27.  
  28.  
  29. #include "mand.h"
  30.  
  31. extern FILE *console;
  32.  
  33.  
  34. Information(page)
  35. SHORT page;
  36. {
  37.    FILE *c;
  38.  
  39.    c = console;
  40.  
  41.    switch (page) {
  42.  
  43. case 0:
  44. case 1:
  45. fprintf(c, "Mandelbrot Self-Squared Dragon Generator Version %s\n", VERSION);
  46. fputs("Copyright (C) 1985 - Robert S. French\n",c);
  47. fputs("Extensively augmented (with Intuition!) by  =RJ Mical=  1985\n",c);
  48. fputs("Placed in the public domain\n",c);
  49. fputs("\n",c);
  50. fputs("Inspired by Scientific American, August/1985\n",c);
  51. fputs("Corrections and improvements suggested by\n",c);
  52. fputs("\"The Fractal Geometry of Nature\"\n",c);
  53. fputs("By Benoit Mandelbrot, W.H. Freeman and Company, 1983\n",c);
  54. fputs("(Used to be Z=Z^2+C, now is Z=Z^2-u, etc.)\n",c);
  55. fputs("\n",c);
  56. fputs("Robert S. French may be contacted at:\n",c);
  57. fputs("   USPS:   2740 Frankfort Avenue\n",c);
  58. fputs("           Louisville, Ky  40206\n",c);
  59. fputs("   Phone: (502) 897-5096   ARPA: French#Robert%d@LLL-MFE\n",c);
  60. fputs("=RJ Mical= may be contacted at:\n",c);
  61. fputs("         Commodore-Amiga, Inc.\n",c);
  62. fputs("         983 University Avenue\n",c);
  63. fputs("         Los Gatos, CA  95030\n",c);
  64. break;
  65.  
  66. case 2:
  67. fputs("The Mandelbrot set consists of pairs of numbers, one number\n",c);
  68. fputs("real and the other complex.  This set can be graphed using\n",c);
  69. fputs("one axis for the real numbers and the other for the complex\n",c);
  70. fputs("numbers.  The Mandelbrot set is located on a graph roughly\n",c);
  71. fputs("centered over the origin (0,0).  The default settings of\n",c);
  72. fputs("this program create a display that shows the entire set.\n",c);
  73. fputs("All of the black display pixels represent Mandelbrot pairs.\n",c);
  74. fputs("The shaded pixels show the pairs that are *almost* in the\n",c);
  75. fputs("set.  The pairs nearest the set on the display just miss\n",c);
  76. fputs("making it into the set numerically; these are white.  The\n",c);
  77. fputs("more grey a position, the further the pair is from the set.\n",c);
  78. fputs("    This program lets you explore the Mandelbrot set by\n",c);
  79. fputs("panning across and zooming in to look at details of the set.\n",c);
  80. fputs("You can also change colors and display mode.  For instance:\n",c);
  81. fputs(" : CS 1      ; Use the fancy arrangements of color set 1\n",c);
  82. fputs(" : CO 29     ; Set the initial color offset\n",c);
  83. fputs(" : CI 4      ; Set the color increment\n",c);
  84. fputs(" : MC 29     ; Set the maximum tests count\n",c);
  85. fputs(" : G         ; Generate the picture\n",c);
  86. break;
  87.  
  88.  
  89. case 3:
  90. fputs("The MC command lets you specify how many times each position\n",c);
  91. fputs("is tested to see whether or not it's in the Mandelbrot set.\n",c);
  92. fputs("A low MC value means that very few tests will be done on\n",c);
  93. fputs("position, which will cause the display to be created more\n",c);
  94. fputs("quickly, but which will also have a cruder approximation of\n",c);
  95. fputs("the Mandelbrot set and, consequently, fewer colors.\n",c);
  96. fputs("\n",c);
  97. fputs("The MX and MY commands set the size of the display window.\n",c);
  98. fputs("The larger your window, the longer it takes for the picture\n",c);
  99. fputs("to be resolved.  While you're experimenting with the\n",c);
  100. fputs("program, you should create a smaller window with a lower\n",c);
  101. fputs("count value until you get approximately the picture that you\n",c);
  102. fputs("want to see.  Then when you've gotten a picture you want to\n",c);
  103. fputs("see in large scale, increase the size and count resolution\n",c);
  104. fputs("to see the detailed version of your picture.  For instance:\n",c);
  105. fputs(" : MC 8        ; Each position will be tested only 8 times\n",c);
  106. fputs(" : MX 80       ; The width is 25% of full width\n",c);
  107. fputs(" : MY 50       ; The height is 25% of full height\n",c);
  108. fputs(" : G           ; Generate the picture\n",c);
  109. break;
  110.  
  111. case 4:
  112. fputs(" : CS 1        ; Color set 1 (special ranges of colors)\n",c);
  113. fputs(" : CI 1        ; Color increment of 1 (smallest increment)\n",c);
  114. fputs(" : MC 29       ; Count position and number of colors\n",c);
  115. fputs("Then, by setting the initial color offset into color set 1 \n",c);
  116. fputs("using the command CO, you can select from these ranges:\n",c);
  117. fputs("      ======    ===========================================\n",c);
  118. fputs("        1-15    unit steps of blue\n",c);
  119. fputs("       16-30    unit steps of green\n",c);
  120. fputs("       31-45    unit steps of red\n",c);
  121. fputs("       46-60    unit steps of sky sky blue (blue and green)\n",c);
  122. fputs("       61-75    unit steps of purple (blue and red)\n",c);
  123. fputs("       76-90    unit steps of yellow (red and green)\n",c);
  124. fputs("       91-115   unit steps of white (all colors)\n",c);
  125. fputs("CM is the command to set the display mode.  Add up these:\n",c);
  126. fputs("    o  add 1 to get NO HOLD-AND-MODIFY\n",c);
  127. fputs("    o  add 2 to get INTERLACE\n",c);
  128. fputs("    o  add 4 to get HIRES (640 columns; low-res is 320)\n",c);
  129. fputs("For instance, for HIRES and NO HOLD-AND-MODIFY, add 1 + 4:\n",c);
  130. fputs(" : CM 5\n",c);
  131. break;
  132.  
  133. case 5:
  134. fputs("The starting (left) and ending (right) edge values for the\n",c);
  135. fputs("axis of the real numbers (the horizontal axis) can be set\n",c);
  136. fputs("using the commands SR (Start Real) and ER (End Real).  For\n",c);
  137. fputs("the complex numbers axis (vertical) the start (bottom) and\n",c);
  138. fputs("end (top) edge values are set using SI and EI.  Got it?\n",c);
  139. fputs("    The graph that you get with this program's default\n",c);
  140. fputs("values has the real numbers along the horizontal axis.  The\n",c);
  141. fputs("leftmost position represents the real number -2.85.  The\n",c);
  142. fputs("rightmost position represents 2.85.  The complex numbers\n",c);
  143. fputs("are charted along the vertical axis, starting at the bottom\n",c);
  144. fputs("with a value of -2.05 and ranging up to 2.05 at the top.\n",c);
  145. fputs("    You control the range of these axes using the text\n",c);
  146. fputs("commands SR, ER, SI and EI.  The commands ZR and ZI let you\n",c);
  147. fputs("zoom in or out on the real and imaginary axes respectively.\n",c);
  148. fputs("ZB lets you zoom on both proportionally.\n",c);
  149. fputs("    Once the display is built, there are ZOOM menu commands\n",c);
  150. fputs("which allow you to zoom in and out automatically.  These\n",c);
  151. fputs("are more convenient than using the text commands.  On the\n",c);
  152. fputs("other hand, the text commands lend precision.\n",c);
  153. break;
  154.  
  155. case 6:
  156. fputs("There's lots more to this program than what's described on\n",c);
  157. fputs("these info pages.  You should read the available text on\n",c);
  158. fputs("Mandelbrot sets (see info page 1).  This program has more \n",c);
  159. fputs("features than what's described here.  If you can get your\n",c);
  160. fputs("hands on the source, you're welcome to expand these pages.\n",c);
  161. fputs("In fact, this program is still far from complete.  Care to\n",c);
  162. fputs("have a bash at it?  We need the greater-precision \n",c);
  163. fputs("floating point.  Also, we seriously need to be able to\n",c);
  164. fputs("save some or all of the image to a disk file in IFF format.\n",c);
  165. fputs("\n",c);
  166. fputs("Good luck.  Have fun!  Send mail (on USENET at least!) if\n",c);
  167. fputs("you find spectacular scenes.\n",c);
  168. break;
  169.  
  170.  
  171. default:
  172. fputs("SORRY:  there's not that many pages of info available!\n",c);
  173. AvailableCommands();
  174. break;
  175.  
  176.    }
  177.  
  178. }
  179.  
  180.  
  181. AvailableCommands()
  182. {
  183.     FILE *c;
  184.  
  185.     c = console;
  186.  
  187. /* === TRY TO KEEP THIS PAGE 18 LINES TALL AT MOST ======================== */
  188. fputs("AVAILABLE COMMANDS:\n",c);
  189. fputs("SH   - Show current settings        G  - Generate picture\n",c);
  190. fputs("I n  - Information pages            Q  - Quit\n",c);
  191. fputs("\n",c);
  192. fputs("SR n / SI n / ER n / EI n - Starting and ending coords\n",c);
  193. fputs("MX n / MY n / MC n - Maximum x and y resolution and count\n",c);
  194. fputs("XR n / XI n - Displace coord\n",c);
  195. fputs("ZR n / ZI n / ZB n - Zoom around center point\n",c);
  196. fputs("\n",c);
  197. fputs("CM n - Graphics mode                F n - Dragon function\n",c);
  198. fputs("CI n - Color increment              CD  - Color divisor\n",c);
  199. fputs("CO n - Color offset                 CS  - Color set\n",c);
  200. fputs("CT n - Color for points in set      P n - Start from Preset\n",c);
  201. fputs("\n",c);
  202. fputs("D  - Display picture                A  - Analyze\n",c);
  203. fputs("SA filename - Save picture          L name - Load picture\n",c);
  204. fputs("< filename - Redirect input         ; string - Comment\n",c);
  205. fprintf(c,"MM n - Maximum number of %d pixel lines in memory\n",MAXX);
  206.  
  207. }
  208.